#ifndef _BACK_GROUND_LAYER_H_
#define _BACK_GROUND_LAYER_H_
#include "cocos2d.h"
#include "ICC.h"


struct ShowList{
	struct ShowList *next;
	cocos2d::CCSprite *pSprite;
};


class BackGroundLayer : public cocos2d::CCLayer
{
private:
	ICC *icc;
	int ic;
	bool shouldCover;
	static int iCount;
	std::string cityString ;
	std::string desertString  ;
	std::string pngString ;
	cocos2d::CCSize winSize;
	cocos2d::CCSprite *sprites[SPRITESNUMS];
	struct ShowList *showList;
	int showIndex[2];
	int currentStyle;
	cocos2d::CCPoint getNewPosition();
	void loadTexture();
	void initPosition();
	void initData();
	void updateShowSprites(struct ShowList *pShow,float n);
	cocos2d::CCSprite *getNextSprite(bool isReversal);
	void setOther();
public:
	static int isShouldReversal();
	BackGroundLayer(std::string cstring,std::string dstring);
	~BackGroundLayer(void);
	void draw();
};
#endif

